package com.group3.Feign;

import com.group3.common.result.ApiResponse;
import com.group3.config.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "ls-service-cache", configuration = FeignConfiguration.class)
public interface CacheServiceFeign {

    @GetMapping("/cache/repeatedSeckill")
    ApiResponse<Boolean> repeatedSeckill(@RequestParam Integer uid, @RequestParam Integer pid);

    @GetMapping("/cache/addRepeatedSeckillUser")
    ApiResponse<Void> addRepeatedSeckillUser(@RequestParam Integer uid, @RequestParam Integer pid);

    @GetMapping("/cache/isStockOver")
    ApiResponse<Boolean> isStockOver(@RequestParam Integer pid);

    @GetMapping("/cache/markStockOver")
    ApiResponse<Void> markStockOver(@RequestParam Integer pid);
}